<?php
/**
 * 修改昵称
 */
use Doraemon\tools\Log;
use Doraemon\service\DesignerInfoLib\OperateInfoService as sOperateInfo;

class ModifyNickAction extends ActionPlugin {

    public function main() {
        Log::info('设计师修改昵称接收到事件信息', $this->messageBody);
        $message = $this->messageBody;
        $uid = $this->messageBody['data']['uid'];
        $newNick = $this->messageBody['data']['nick'];
        // 更新设计师信息库中的认证状态为取消认证
        sOperateInfo::updateNick($uid, $newNick);
        Log::info('设计师修改昵称接收到的事件', compact('uid', 'message'));
        $this->setSuccess();
    }
}